<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- For Mobile Devices -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta name="generator" content="Doxygen 1.8.15" />
    <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
    <title>DJI Onboard SDK: DJI::OSDK::DataSubscription Class Reference</title>
    <!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
    <link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
    <link rel="stylesheet" href="bootstrap.min.css">
    <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="bootstrap-theme.css">
    <script src="bootstrap.min.js"></script>
    <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
    <!-- SmartMenus jQuery plugin -->
    <script type="text/javascript" src="jquery.smartmenus.min.js"></script>
    <!-- SmartMenus jQuery Bootstrap Addon -->
    <script type="text/javascript" src="jquery.smartmenus.bootstrap.min.js"></script>
    <style>
        .has-submenu {
            position: relative;
        }
        #main-nav {
            margin-top: 60px;
        }
    </style>
</head>
<body>
    <nav id="site-header" class="site-header navbar">
        <div class="container">
            <div class="navbar-header"><a href="/" class="logo"><img src="dji-logo@2x.png">Developer</a></div>
            <div id="header-navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a href="/mobile-sdk">Mobile SDK</a></li>
                    <li><a href="/ux-sdk">UX SDK</a></li>
                    <li><a href="/onboard-sdk">Onboard SDK</a></li>
                    <li><a href="/payload-sdk">Payload SDK</a></li>
                    <li><a href="/windows-sdk">Windows SDK</a></li>
                </ul>
                <ul v-cloak="" v-show="!loggedIn" class="nav navbar-nav navbar-right nav-user">
                    <li><a
                            href="https://account.dji.com/login?appId=dji_sdk&backUrl=https%3A%2F%2Fdeveloper.dji.com%2Fuser&locale=en_US">Login</a>
                    </li>
                    <li><a href="https://account.dji.com/register?appId=dji_sdk&backUrl=https%3A%2F%2Fdeveloper.dji.com%2Fuser&locale=en_US"
                            class="head-cta">Register</a></li>
                </ul>
                <ul v-cloak="" v-show="loggedIn" class="nav navbar-nav navbar-right nav-user">
                    <li class="hovedown"><a href="javascript:void(0);" class="hovedown-toggle"><i
                                class="fa fa-user"></i></a>
                        <ul class="hovedown-menu hovedown-menu-right">
                            <li><a href="/user">User Center</a></li>
                            <li><a href="javascript:void(0);" v-on="click: logout">Logout</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    <div data-offset-top="60" data-spy="affix" class="sub-nav">
        <div class="container">
            <h1 class="logo">Onboard SDK</h1>
            <nav><a href="/onboard-sdk">Overview</a><a href="/onboard-sdk/documentation">Documentation</a><a
                    href="/onboard-api-reference/index.html" class="active">API Reference</a><a
                    href="/onboard-sdk/downloads">Downloads</a>
            </nav>
        </div>
    </div>
    <!--<nav class="navbar navbar-default" role="navigation">-->
    <!--<div class="container">-->
    <!--<div class="navbar-header">-->
    <!--<a href="#" class="navbar-left"><img src="dji_logo_gray_small.png" alt="DJI OSDK API Documentation" width="32px"/></a>-->
    <!--<a class="navbar-brand" href="index.html">ONBOARD SDK 3.3</a>-->
    <!--</div>-->
    <!--</div>-->
    <!--</nav>-->
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <div class="content" id="content">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                        <div style="margin-bottom: 15px;">
                            <!-- end header part --><!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceDJI.html">DJI</a></li><li class="navelem"><a class="el" href="namespaceDJI_1_1OSDK.html">OSDK</a></li><li class="navelem"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html">DataSubscription</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classDJI_1_1OSDK_1_1DataSubscription-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">DJI::OSDK::DataSubscription Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="namespaceDJI_1_1OSDK_1_1Telemetry.html" title="This namespace encapsulates all available telemetry topics through either Broadcast or Subscribe.">Telemetry</a> API through asynchronous "Subscribe"-style messages.  
 <a href="classDJI_1_1OSDK_1_1DataSubscription.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="dji__subscription_8hpp_source.html">dji_subscription.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac8d44d4288c7fbdff9fb904606c7bfc8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#ac8d44d4288c7fbdff9fb904606c7bfc8">DataSubscription</a> (<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *vehicle)</td></tr>
<tr class="separator:ac8d44d4288c7fbdff9fb904606c7bfc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9f64626738f25867e4046cf703b53c0"><td class="memItemLeft" align="right" valign="top"><a id="ac9f64626738f25867e4046cf703b53c0"></a>
<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getVehicle</b> ()</td></tr>
<tr class="separator:ac9f64626738f25867e4046cf703b53c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47dd81b458bde99864994ad808d9ff02"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a47dd81b458bde99864994ad808d9ff02">initPackageFromTopicList</a> (int packageID, int numberOfTopics, <a class="el" href="group__telem.html#ga563d2333dc43253129a3915970f99cfa">Telemetry::TopicName</a> *topicList, bool sendTimeStamp, uint16_t freq)</td></tr>
<tr class="memdesc:a47dd81b458bde99864994ad808d9ff02"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the interface for the end user to generate a package for subscription.  <a href="#a47dd81b458bde99864994ad808d9ff02">More...</a><br /></td></tr>
<tr class="separator:a47dd81b458bde99864994ad808d9ff02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a3cf7624e29d3a6ccb1b524d40c3b3f"><td class="memItemLeft" align="right" valign="top"><a id="a6a3cf7624e29d3a6ccb1b524d40c3b3f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a6a3cf7624e29d3a6ccb1b524d40c3b3f">verify</a> ()</td></tr>
<tr class="memdesc:a6a3cf7624e29d3a6ccb1b524d40c3b3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking call for version match. <br /></td></tr>
<tr class="separator:a6a3cf7624e29d3a6ccb1b524d40c3b3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d05e8d87cb82b8a9f3cd12fe1d16e7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a5d05e8d87cb82b8a9f3cd12fe1d16e7d">verify</a> (int timeout)</td></tr>
<tr class="memdesc:a5d05e8d87cb82b8a9f3cd12fe1d16e7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocking call for version match.  <a href="#a5d05e8d87cb82b8a9f3cd12fe1d16e7d">More...</a><br /></td></tr>
<tr class="separator:a5d05e8d87cb82b8a9f3cd12fe1d16e7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87ba0e274119c68277bb749de1aad39e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a87ba0e274119c68277bb749de1aad39e">startPackage</a> (int packageID)</td></tr>
<tr class="memdesc:a87ba0e274119c68277bb749de1aad39e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking call for starting a package.  <a href="#a87ba0e274119c68277bb749de1aad39e">More...</a><br /></td></tr>
<tr class="separator:a87ba0e274119c68277bb749de1aad39e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71c59eafc86a428f1c97bf049a68bdc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a71c59eafc86a428f1c97bf049a68bdc5">startPackage</a> (int packageID, int timeout)</td></tr>
<tr class="memdesc:a71c59eafc86a428f1c97bf049a68bdc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocking call for start package.  <a href="#a71c59eafc86a428f1c97bf049a68bdc5">More...</a><br /></td></tr>
<tr class="separator:a71c59eafc86a428f1c97bf049a68bdc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ae1664ca9f58407ce6ae7e4f1bd88a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a9ae1664ca9f58407ce6ae7e4f1bd88a0">removePackage</a> (int packageID)</td></tr>
<tr class="memdesc:a9ae1664ca9f58407ce6ae7e4f1bd88a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking call for start package.  <a href="#a9ae1664ca9f58407ce6ae7e4f1bd88a0">More...</a><br /></td></tr>
<tr class="separator:a9ae1664ca9f58407ce6ae7e4f1bd88a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f9001747df88da06671f5ddcef9c82b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a3f9001747df88da06671f5ddcef9c82b">removePackage</a> (int packageID, int timeout)</td></tr>
<tr class="memdesc:a3f9001747df88da06671f5ddcef9c82b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking call for start package.  <a href="#a3f9001747df88da06671f5ddcef9c82b">More...</a><br /></td></tr>
<tr class="separator:a3f9001747df88da06671f5ddcef9c82b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a411dd8a2e27e61d846441c3a923d35a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a411dd8a2e27e61d846441c3a923d35a9">removeLeftOverPackages</a> ()</td></tr>
<tr class="memdesc:a411dd8a2e27e61d846441c3a923d35a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove leftover incoming telemetry data due to unclean quit.  <a href="#a411dd8a2e27e61d846441c3a923d35a9">More...</a><br /></td></tr>
<tr class="separator:a411dd8a2e27e61d846441c3a923d35a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9afcdd6ce4c8dcc98d759db89632488c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a9afcdd6ce4c8dcc98d759db89632488c">removeAllExistingPackages</a> ()</td></tr>
<tr class="memdesc:a9afcdd6ce4c8dcc98d759db89632488c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all occupied packages.  <a href="#a9afcdd6ce4c8dcc98d759db89632488c">More...</a><br /></td></tr>
<tr class="separator:a9afcdd6ce4c8dcc98d759db89632488c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a756a7136a09910fed24222d6312edd7d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a756a7136a09910fed24222d6312edd7d">reset</a> ()</td></tr>
<tr class="memdesc:a756a7136a09910fed24222d6312edd7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking call for resetting all packages.  <a href="#a756a7136a09910fed24222d6312edd7d">More...</a><br /></td></tr>
<tr class="separator:a756a7136a09910fed24222d6312edd7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0b76908b80a597513bbb51320a93b84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#ab0b76908b80a597513bbb51320a93b84">reset</a> (int timeout)</td></tr>
<tr class="memdesc:ab0b76908b80a597513bbb51320a93b84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocking call for resetting all packages.  <a href="#ab0b76908b80a597513bbb51320a93b84">More...</a><br /></td></tr>
<tr class="separator:ab0b76908b80a597513bbb51320a93b84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69bfb721713e8fdd164d1cf065d7a180"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a69bfb721713e8fdd164d1cf065d7a180">registerUserPackageUnpackCallback</a> (int packageID, <a class="el" href="namespaceDJI_1_1OSDK.html#a20a68c21abe449cf5f133f7d398055d3">VehicleCallBack</a> userFunctionAfterPackageExtraction, <a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a> userData=NULL)</td></tr>
<tr class="memdesc:a69bfb721713e8fdd164d1cf065d7a180"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a callback function after package[packageID] is received.  <a href="#a69bfb721713e8fdd164d1cf065d7a180">More...</a><br /></td></tr>
<tr class="separator:a69bfb721713e8fdd164d1cf065d7a180"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1f22050cb2f3e96d570afc40619b346"><td class="memTemplParams" colspan="2"><a id="af1f22050cb2f3e96d570afc40619b346"></a>
template&lt;Telemetry::TopicName topic&gt; </td></tr>
<tr class="memitem:af1f22050cb2f3e96d570afc40619b346"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="structDJI_1_1OSDK_1_1Telemetry_1_1TypeMap.html">Telemetry::TypeMap</a>&lt; topic &gt;::type&#160;</td><td class="memTemplItemRight" valign="bottom"><b>getValue</b> ()</td></tr>
<tr class="separator:af1f22050cb2f3e96d570afc40619b346"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab8612b27a4c74b40a065517130450ea7"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#ab8612b27a4c74b40a065517130450ea7">verifyCallback</a> (<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *vehiclePtr, RecvContainer rcvContainer, <a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a> userData)</td></tr>
<tr class="memdesc:ab8612b27a4c74b40a065517130450ea7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function for non-blocking <a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a6a3cf7624e29d3a6ccb1b524d40c3b3f" title="Non-blocking call for version match.">verify()</a>  <a href="#ab8612b27a4c74b40a065517130450ea7">More...</a><br /></td></tr>
<tr class="separator:ab8612b27a4c74b40a065517130450ea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af527c15fc0b3905647b70060446d5da3"><td class="memItemLeft" align="right" valign="top"><a id="af527c15fc0b3905647b70060446d5da3"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>addPackageCallback</b> (<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *vehiclePtr, RecvContainer rcvContainer, <a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a> pkgHandle)</td></tr>
<tr class="separator:af527c15fc0b3905647b70060446d5da3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad78fb842176286f9078d84a8ce633a6e"><td class="memItemLeft" align="right" valign="top"><a id="ad78fb842176286f9078d84a8ce633a6e"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>removePackageCallback</b> (<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *vehiclePtr, RecvContainer rcvContainer, <a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a> pkgHandle)</td></tr>
<tr class="separator:ad78fb842176286f9078d84a8ce633a6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9da3865552abcb904f77fa0729d5f08"><td class="memItemLeft" align="right" valign="top"><a id="ab9da3865552abcb904f77fa0729d5f08"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>resetCallback</b> (<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *vehiclePtr, RecvContainer rcvContainer, <a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a> pkgHandle)</td></tr>
<tr class="separator:ab9da3865552abcb904f77fa0729d5f08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33b0917c8430a186fdea272f552a80b7"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a33b0917c8430a186fdea272f552a80b7">decodeCallback</a> (<a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *vehiclePtr, RecvContainer rcvContainer, <a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a> subscriptionPtr)</td></tr>
<tr class="memdesc:a33b0917c8430a186fdea272f552a80b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This callback function is called by recvReqData, case CMD_ID_SUBSCRIBE.  <a href="#a33b0917c8430a186fdea272f552a80b7">More...</a><br /></td></tr>
<tr class="separator:a33b0917c8430a186fdea272f552a80b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:acef1eb8a3a89f8db5673e00a5cbb7a94"><td class="memItemLeft" align="right" valign="top"><a id="acef1eb8a3a89f8db5673e00a5cbb7a94"></a>
<a class="el" href="structDJI_1_1OSDK_1_1VehicleCallBackHandler.html">VehicleCallBackHandler</a>&#160;</td><td class="memItemRight" valign="bottom"><b>subscriptionDataDecodeHandler</b></td></tr>
<tr class="separator:acef1eb8a3a89f8db5673e00a5cbb7a94"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a8ff918b3b1ecc7bf04d6f444250ee942"><td class="memItemLeft" align="right" valign="top"><a id="a8ff918b3b1ecc7bf04d6f444250ee942"></a>
static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_NUMBER_OF_PACKAGE</b> = 5</td></tr>
<tr class="separator:a8ff918b3b1ecc7bf04d6f444250ee942"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="namespaceDJI_1_1OSDK_1_1Telemetry.html" title="This namespace encapsulates all available telemetry topics through either Broadcast or Subscribe.">Telemetry</a> API through asynchronous "Subscribe"-style messages. </p>
<p>The subscribe API allows fine-grained control over requesting various topics at various frequencies.</p>
<p>All topics at a certain frequency should be put into a single "package".</p>
<dl class="section note"><dt>Note</dt><dd>Subscribe-style telemetry is a new feature, available since <a class="el" href="namespaceDJI_1_1OSDK.html">OSDK</a> 3.3 </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac8d44d4288c7fbdff9fb904606c7bfc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8d44d4288c7fbdff9fb904606c7bfc8">&#9670;&nbsp;</a></span>DataSubscription()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DataSubscription::DataSubscription </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *&#160;</td>
          <td class="paramname"><em>vehiclePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<ol type="1">
<li>Initialize the api member<ol type="a">
<li>Set each package[i] entry with packageID = i</li>
<li>Set the decodeCallback function </li>
</ol>
</li>
</ol>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a33b0917c8430a186fdea272f552a80b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33b0917c8430a186fdea272f552a80b7">&#9670;&nbsp;</a></span>decodeCallback()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::decodeCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *&#160;</td>
          <td class="paramname"><em>vehiclePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RecvContainer&#160;</td>
          <td class="paramname"><em>rcvContainer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a>&#160;</td>
          <td class="paramname"><em>subPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This callback function is called by recvReqData, case CMD_ID_SUBSCRIBE. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">API</td><td></td></tr>
    <tr><td class="paramname">header</td><td></td></tr>
    <tr><td class="paramname">subHandle</td><td>The pointer to the subscription object.</td></tr>
  </table>
  </dd>
</dl>
<p>: decodeCallback is a static function and cannot access object member. In order to access members, it needs a pointer to the subscription. </p>

</div>
</div>
<a id="a47dd81b458bde99864994ad808d9ff02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47dd81b458bde99864994ad808d9ff02">&#9670;&nbsp;</a></span>initPackageFromTopicList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool DataSubscription::initPackageFromTopicList </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>packageID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberOfTopics</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__telem.html#ga563d2333dc43253129a3915970f99cfa">Telemetry::TopicName</a> *&#160;</td>
          <td class="paramname"><em>topicList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>sendTimeStamp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>freq</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the interface for the end user to generate a package for subscription. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packageID</td><td>The ID of package it'll generate </td></tr>
    <tr><td class="paramname">numberOfTopics</td><td></td></tr>
    <tr><td class="paramname">topicList</td><td>List of Topic Names to subscribe in the package </td></tr>
    <tr><td class="paramname">sendTimeStamp</td><td>Note that timestamp is the time of package transmission, not data acquisition from sensor. </td></tr>
    <tr><td class="paramname">freq</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
<p>Setup members of package[packageID] Do basic gate keeping. No api-&gt;send call involved </p>

</div>
</div>
<a id="a69bfb721713e8fdd164d1cf065d7a180"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69bfb721713e8fdd164d1cf065d7a180">&#9670;&nbsp;</a></span>registerUserPackageUnpackCallback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::registerUserPackageUnpackCallback </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>packageID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceDJI_1_1OSDK.html#a20a68c21abe449cf5f133f7d398055d3">VehicleCallBack</a>&#160;</td>
          <td class="paramname"><em>userFunctionAfterPackageExtraction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a>&#160;</td>
          <td class="paramname"><em>userData</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register a callback function after package[packageID] is received. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packageID</td><td></td></tr>
    <tr><td class="paramname">userFunctionAfterPackageExtraction</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9afcdd6ce4c8dcc98d759db89632488c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9afcdd6ce4c8dcc98d759db89632488c">&#9670;&nbsp;</a></span>removeAllExistingPackages()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::removeAllExistingPackages </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove all occupied packages. </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a411dd8a2e27e61d846441c3a923d35a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a411dd8a2e27e61d846441c3a923d35a9">&#9670;&nbsp;</a></span>removeLeftOverPackages()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::removeLeftOverPackages </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove leftover incoming telemetry data due to unclean quit. </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a9ae1664ca9f58407ce6ae7e4f1bd88a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ae1664ca9f58407ce6ae7e4f1bd88a0">&#9670;&nbsp;</a></span>removePackage() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::removePackage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>packageID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Non-blocking call for start package. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packageID</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a3f9001747df88da06671f5ddcef9c82b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f9001747df88da06671f5ddcef9c82b">&#9670;&nbsp;</a></span>removePackage() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a> DataSubscription::removePackage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>packageID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Non-blocking call for start package. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packageID</td><td></td></tr>
    <tr><td class="paramname">timeout</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a756a7136a09910fed24222d6312edd7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a756a7136a09910fed24222d6312edd7d">&#9670;&nbsp;</a></span>reset() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Non-blocking call for resetting all packages. </p>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="ab0b76908b80a597513bbb51320a93b84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0b76908b80a597513bbb51320a93b84">&#9670;&nbsp;</a></span>reset() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a> DataSubscription::reset </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Blocking call for resetting all packages. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeout</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a87ba0e274119c68277bb749de1aad39e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87ba0e274119c68277bb749de1aad39e">&#9670;&nbsp;</a></span>startPackage() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::startPackage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>packageID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Non-blocking call for starting a package. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packageID</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a71c59eafc86a428f1c97bf049a68bdc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71c59eafc86a428f1c97bf049a68bdc5">&#9670;&nbsp;</a></span>startPackage() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a> DataSubscription::startPackage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>packageID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Blocking call for start package. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packageID</td><td></td></tr>
    <tr><td class="paramname">timeout</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="a5d05e8d87cb82b8a9f3cd12fe1d16e7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d05e8d87cb82b8a9f3cd12fe1d16e7d">&#9670;&nbsp;</a></span>verify()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDJI_1_1OSDK_1_1ACK_1_1ErrorCode.html">ACK::ErrorCode</a> DataSubscription::verify </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Blocking call for version match. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeout</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a id="ab8612b27a4c74b40a065517130450ea7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8612b27a4c74b40a065517130450ea7">&#9670;&nbsp;</a></span>verifyCallback()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void DataSubscription::verifyCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classDJI_1_1OSDK_1_1Vehicle.html">Vehicle</a> *&#160;</td>
          <td class="paramname"><em>vehiclePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RecvContainer&#160;</td>
          <td class="paramname"><em>rcvContainer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceDJI_1_1OSDK.html#aded24c93a2d064658a1f59cbf0e6eb9d">UserData</a>&#160;</td>
          <td class="paramname"><em>userData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback function for non-blocking <a class="el" href="classDJI_1_1OSDK_1_1DataSubscription.html#a6a3cf7624e29d3a6ccb1b524d40c3b3f" title="Non-blocking call for version match.">verify()</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">API</td><td></td></tr>
    <tr><td class="paramname">header</td><td></td></tr>
    <tr><td class="paramname">userData</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>osdk-core/api/inc/<a class="el" href="dji__subscription_8hpp_source.html">dji_subscription.hpp</a></li>
<li>osdk-core/api/src/<a class="el" href="dji__subscription_8cpp.html">dji_subscription.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
  <footer id="site-footer" class="site-footer">
    <div class="container">
      <div class="foot-nav row">
        <nav class="link-list col-xs-2"><span class="title">SDK</span><a href="/mobile-sdk">Mobile SDK</a><a href="/ux-sdk">UX SDK</a><a href="/onboard-sdk">Onboard SDK</a><a href="/payload-sdk">Payload SDK</a><a href="/windows-sdk">Windows SDK</a></nav>
        <nav class="link-list col-xs-2"><span class="title">Info</span><a href="/products">Products</a></nav>
        <nav class="link-list col-xs-2"><span class="title">Community</span><a href="http://stackoverflow.com/questions/tagged/dji-sdk" target="_blank">Stack Overflow</a><a href="https://www.youtube.com/channel/UCPQwN5xsob8zZGIcDhkYqUA" target="_blank">YouTube</a><a href="https://twitter.com/djidevelopers" target="_blank">Twitter</a></nav>
        <nav class="link-list col-xs-2"><span class="title">Contact Us</span><a href="mailto:dev@dji.com"> dev@dji.com</a></nav>
        <nav class="link-list col-xs-2"><span class="title">Business Cooperation</span><a href="mailto:dev@dji.com"> dev@dji.com</a></nav>
        <nav class="link-list col-xs-2"><span class="title">BILLING</span><a href="mailto:billing-dev@dji.com"> billing-dev@dji.com</a></nav>
      </div>
      <div class="foot-copyright row">
        <div class="col-xs-3 foot-logo"><img src="dji-logo-foot.png"></div>
        <div class="copyright col-xs-7"><span>Copyright © 2018 DJI All Rights Reserved</span><a href="/policies/privacy">Privacy Policy</a><a href="/policies/terms">Terms of Use</a></div>
        <div class="col-xs-2">
          <div class="lang-selector">
            <select dir="rtl" v-model="lang">
              <option value="en">English</option>
              <option value="cn">中文</option>
            </select><i class="fa fa-globe"></i>
          </div>
        </div>
      </div>
    </div>
  </footer>
</small></address>
</body>
<script type="text/javascript" src="doxy-boot.js"></script>
</html>
